var t = require;
var e = module;
var o = exports;
var n =
    (this && this.__extends) ||
    (function () {
        var t = function (e, o) {
            return (t =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (t, e) {
                        t.__proto__ = e;
                    }) ||
                function (t, e) {
                    for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
                })(e, o);
        };
        return function (e, o) {
            function n() {
                this.constructor = e;
            }
            t(e, o), (e.prototype = null === o ? Object.create(o) : ((n.prototype = o.prototype), new n()));
        };
    })();
Object.defineProperty(o, "__esModule", {value: !0});
var r = t("fsm"),
    a = t("fightManager"),
    i = t("bodyIdle"),
    s = (function (t) {
        function e() {
            return (null !== t && t.apply(this, arguments)) || this;
        }
        return (
            n(e, t),
            (e.prototype.onEnter = function () {
                this.攻击者.node.x > this.context.node.x
                    ? ((this.context.direction.value = -1), (this.speedx = -this.击退距离 / this.击退时间))
                    : ((this.context.direction.value = 1), (this.speedx = this.击退距离 / this.击退时间)),
                    this.context.sk.play("Hit", !1),
                    (this.击退dt = 0);
            }),
            (e.prototype.onExit = function () {
                this.context.stop();
            }),
            (e.prototype.onUpdate = function (t) {
                this.context.moveToHitBack(this.speedx, 0),
                    (this.击退dt += a.default.gamedt(t)),
                    this.击退dt >= this.击退时间 && r.changeState(this.context, i.default);
            }),
            (e.prototype.onMove = function () {}),
            (e.prototype.onMoveStop = function () {}),
            (e.prototype.on_skill = function () {}),
            e
        );
    })(t("bodyState").default);
o.default = s;
